package com.weishi.pay.serviceImpl;

import com.weishi.pay.api.dto.VoRefundLog;
import com.weishi.pay.api.service.RefundLogService;
import com.weishi.pay.dao.mapper.RefundLogMapper;
import com.weishi.pay.dao.model.RefundLog;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Map;

/**
* RefundLogService实现
* Created by autoCode on 2018/8/18.
* @author autoCode
*/
@Service
@Transactional(rollbackFor = Exception.class)
public class RefundLogServiceImpl implements RefundLogService {

    private static final Logger LOGGER = LoggerFactory.getLogger(RefundLogService.class);

    @Autowired
    RefundLogMapper refundLogMapper;

    @Override
    public void insertLog(VoRefundLog voRefundLog) {
        RefundLog refundLog=new RefundLog();
        BeanUtils.copyProperties(voRefundLog,refundLog);
        refundLogMapper.insertSelective(refundLog);
    }

    @Override
    public void updateStatus(Map updateMap) {
        refundLogMapper.updateStatus(updateMap);
    }
}